//
//  UIDevice+iOS7AndIphone5.m
//  KAKUIAPP
//
//  Created by 123 on 13-12-17.
//  Copyright (c) 2013年 huifu. All rights reserved.
//

#import "UIDevice+iOS7AndIphone5.h"
#define iPhone4 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 960), [[UIScreen mainScreen] currentMode].size) : NO)
#define iPhone5 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 1136), [[UIScreen mainScreen] currentMode].size) : NO)
#define iOS7  ( [[[UIDevice currentDevice] systemVersion] compare:@"7.0"] != NSOrderedAscending )
#define iOS8  ( [[[UIDevice currentDevice] systemVersion] compare:@"8.0"] != NSOrderedAscending )
#define iOS9  ( [[[UIDevice currentDevice] systemVersion] compare:@"9.0"] != NSOrderedAscending )
#define iPhone6 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(750, 1334), [[UIScreen mainScreen] currentMode].size) : NO)
#define iPhone6Plus ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1242, 2208), [[UIScreen mainScreen] currentMode].size) : NO)

@implementation UIDevice (iOS7AndIphone5)
- (BOOL) isIOS9
{
    return iOS9;
}
- (BOOL)isIOS8
{
    return iOS8;
}
- (BOOL)isIOS7
{
    return iOS7;
}
- (BOOL) isIphone4
{
    return iPhone4;
}
- (BOOL) isIphone5
{
    return iPhone5;
}

- (BOOL) isIphone6
{
    return iPhone6;
}

- (BOOL) isIphone6Plus
{
    return iPhone6Plus;
}

@end
